Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appsec: fix IsSecurityError #2746

Merged
merged 1 commit into from
Jun 18, 2024
Merged

appsec: fix IsSecurityError #2746

merged 1 commit into from
Jun 18, 2024

Conversation

eliottness
Copy link
Contributor

@eliottness eliottness commented Jun 17, 2024

What does this PR do?

This PR fix IsSecurityError which did not have the right behaviour and was always returning false in go 1.20

Impact

This function has 2 current uses:

  • It should be used by customers to check whether the WAF blocked a ˋnet/http` outgoing request.
  • It is used in the ˋnet/http` contrib to not report the error as one in the current span.

Both usages are void in go 1.20 without this PR.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@eliottness eliottness requested a review from a team as a code owner June 17, 2024 14:15
@pr-commenter
Copy link

pr-commenter bot commented Jun 17, 2024

Benchmarks

Benchmark execution time: 2024-06-18 07:48:28

Comparing candidate commit aca50fc in PR branch eliott.bouhana/error-as with baseline commit 28066ad in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 0 unstable metrics.

@eliottness eliottness requested review from a team as code owners June 17, 2024 15:19
Signed-off-by: Eliott Bouhana <[email protected]>
@eliottness eliottness enabled auto-merge (squash) June 18, 2024 07:26
@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Jun 18, 2024
auto-merge was automatically disabled June 18, 2024 07:30

Pull Request is not mergeable

@eliottness eliottness enabled auto-merge (squash) June 18, 2024 09:32
@eliottness eliottness added bug unintended behavior that has to be fixed appsec labels Jun 18, 2024
@eliottness eliottness merged commit 8679af2 into main Jun 18, 2024
204 checks passed
@eliottness eliottness deleted the eliott.bouhana/error-as branch June 18, 2024 10:52
eliottness added a commit that referenced this pull request Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs appsec bug unintended behavior that has to be fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants